//
//  M_content.m
//  cardmenNew
//
//  Created by Dengzeyu on 16/1/4.
//  Copyright © 2016年 Dengzeyu. All rights reserved.
//

#import "M_content.h"

@implementation M_content
-(int)check:(M_content *)one andtwo:(NSDictionary *)two
{
    NSLog(@"one name:%@,shopname :%@,kindname: %@ ,Version: %@",one.name,one.shopname,one.kindname,one.Version);
    NSString * nameID =[two objectForKey:@"NameID"];
    NSString * version = [two objectForKey:@"Version"];
    NSString * kindname = [two objectForKey:@"kindname"];
    NSString * shopname = [two objectForKey:@"shopname"];
    
    if([one.name isEqualToString:[two objectForKey:@"NameID"]]&&[one.shopname isEqualToString:[two objectForKey:@"shopname"]]&&[one.kindname isEqualToString:[two objectForKey:@"kindname"]]&&[one.Version isEqualToString:[two objectForKey:@"Version"]])
    {
        return 1;
    }
    else if ([one.name isEqualToString:[two objectForKey:@"NameID"]]&&[one.shopname isEqualToString:[two objectForKey:@"shopname"]]&&[one.kindname isEqualToString:[two objectForKey:@"kindname"]]&&![one.Version isEqualToString:[two objectForKey:@"Version"]])
    {
        return 2;
    }
    else
    {
        return 0;
    }
}
-(void) setself:(NSDictionary *)temp
{
    self.name = [temp objectForKey:@"NameID"];
    self.Lujing = [temp objectForKey:@"Lujing"];
    self.Sort = [temp objectForKey:@"Sort"];
    self.NameID = [temp objectForKey:@"NameID"];
    self.Icon =[temp objectForKey:@"IconID"];
    self.shopname =[temp objectForKey:@"shopname"];
    self.kindname = [temp objectForKey:@"kindname"];
    self.localPath = [temp objectForKey:@"localPath"];
    self.state = [[temp objectForKey:@"state"] intValue];
    self.Zhuangtai = [temp objectForKey:@"Zhuangtai"];
    self.kind =2;
    self.Version = [temp objectForKey:@"Version"];
}
@end
